﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Abp.Domain.Repositories;
using Abp.Domain.Services;
using Abp.UI;
using FwProject.Car;

namespace FwProject.Manager
{
    public class CarMapManager: IDomainService
    {
        private readonly IRepository<CarMap, Guid> _repositoryCarMap;
        public CarMapManager(IRepository<CarMap, Guid> repositoryCarMap)
        {
            _repositoryCarMap = repositoryCarMap;

        }

        public async Task<Guid> CreateCarMap(CarMap map)
        {
            return await _repositoryCarMap.InsertAndGetIdAsync(map);
        }

        public async Task UpdateCarMap(CarMap map)
        {
            await _repositoryCarMap.UpdateAsync(map);
        }

        public async Task DeleteCarMap(CarMap map)
        {
            await _repositoryCarMap.DeleteAsync(map);
        }
    }
}
